<%--
  Created by IntelliJ IDEA.
  User: chen
  Date: 29/03/2018
  Time: 1:25 PM
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" import="java.util.*" contentType="text/html;charset=utf-8"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <base href="<%=basePath%>">

    <title>注册页面</title>

    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->
    <script language="javascript">
        function isValid(form)
        {
            if (form.username.value=="")
            {
                alert("用户名不能为空");
                return false;
            }
            if (form.pwd.value!=form.pwd2.value)
            {
                alert("两次输入的密码不同！");
                return false;
            }
            else  if (form.pwd.value=="")
            {
                alert("用户密码不能为空！");
                return false;
            }
            else return true;
        }
    </script>

    <meta charset="utf-8">
    <title>Fullscreen Login</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- CSS -->
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="css/supersized.css">
    <link rel="stylesheet" href="css/style.css">
</head>

<body>
<center>
    <body oncontextmenu="return false">

    <div class="page-container">
        <h1>用户注册</h1>
        <form action="check2.jsp" method="post" onsubmit="return isValid(this);">
            <div>
                <input type="text" name="username" class="username" placeholder="用户名" autocomplete="off"/>
            </div>
            <div>
                <input type="password" name="pwd" class="password" placeholder="输入密码" oncontextmenu="return false" onpaste="return false" />
            </div>
            <div>
                <input type="password" name="pwd2" class="password" placeholder="再次输入密码" oncontextmenu="return false" onpaste="return false" />
            </div>
            <button type="submit" id="submit">注册</button>
        </form>
        <div class="connect">
        </div>
    </div>
    <div class="alert" style="display:none">
        <h2>消息</h2>
        <div class="alert_con">
            <p id="ts"></p>
            <p style="line-height:70px"><a class="btn">确定</a></p>
        </div>
    </div>
    已经有账号了？点击<a href="login.jsp">这里</a>登录！

    <!-- Javascript -->
    <script src="http://apps.bdimg.com/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
    <script src="js/supersized.3.2.7.min.js"></script>
    <script src="js/supersized-init.js"></script>
    <script>
        $(".btn").click(function(){
            is_hide();
        })
        window.onload = function()
        {
            $(".connect p").eq(0).animate({"left":"0%"}, 600);
            $(".connect p").eq(1).animate({"left":"0%"}, 400);
        }
        function is_hide(){ $(".alert").animate({"top":"-40%"}, 300) }
        function is_show(){ $(".alert").show().animate({"top":"45%"}, 300) }
    </script>
    </body>
</center>
</body>
</html>